package com.konne.nightmare.FastPublicOpinion.http;

import java.io.IOException;

import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

public class AddTokenHead implements Interceptor {

    @Override
    public Response intercept(Interceptor.Chain chain) throws IOException {
        Request original = chain.request();
        Request.Builder requestBuilder = original.newBuilder()
//                .header("Content-Type", "application/json; charset=UTF-8").addHeader("Connection", "close");
                .header("Content-Type", "application/json; charset=UTF-8").addHeader("Connection", "close");


        Request request = requestBuilder.build();
        return chain.proceed(request);
    }


}
